<?php

/**
 * Created by PhpStorm.
 * User: dapeng
 * Date: 2018/10/10
 * Time: 上午11:12
 */
class Action
{
    protected $tp = null;

    function __construct()
    {
        //加载Smarty模板引擎
        include_once "smarty-3.1.33/libs/Autoloader.php";
        Smarty_Autoloader::register();
        $this->tp = new Smarty();
        //模板的路径
        $this->tp->setTemplateDir("smarty/template");
        $this->tp->setConfigDir("smarty/config");
        $this->tp->setCompileDir("smarty/compile");
        $this->tp->caching = false;
        $this->tp->setCacheDir("smarty/cache");
    }
}